import React from 'react';

import './index.less';
import ModelAction from "./actions"

import {
    render
} from 'src/hrpub/common/frame';

import {
    base
} from 'nc-lightapp-front';

const {
    NCModal,
    NCTable,
    NCButton
} = base;
const {
    Header,
    Body,
    Footer
} = NCModal;

export default render({
    actions: {
        modelAct: ModelAction,
    },
    state: {
        viewContractTableInfo: [], // 查看合同表格信息
        viewContractTableData: [], // 查看合同表格数据
        viewContractModalVisible: false
    }
})(({props, state, action}) => {

    const {transfer} = props;

    return (
        <NCModal
            show={state.viewContractModalVisible}
            onHide={action.modelAct.closeModal}
            size="lg"
        >
            <Header
                closeButton={true}
            >
                {transfer.language['gx6008-000083']/** 查看合同和协议 */}
            </Header>
            <Body>
            <div>
                <NCTable
                    columns={state.viewContractTableInfo}
                    data={state.viewContractTableData}
                    scroll={{
                        x: true,
                        y: true
                    }}
                />
            </div>
            </Body>
            <Footer>
                <div className="organization-modal-footer">
                    <NCButton
                        onClick={action.modelAct.closeModal}
                    >
                        {transfer.language['gx6008-000119']/** 关闭 */}
                    </NCButton>
                </div>
            </Footer>
        </NCModal>
    );

});